﻿<UserControl
    x:Class="WinRTXamlToolkit.Sample.Views.WatermarkPasswordBoxTestView"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:xc="using:WinRTXamlToolkit.Controls"
    xmlns:local="using:WinRTXamlToolkit.Sample.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition
                Width="Auto" />
            <ColumnDefinition
                Width="*" />
        </Grid.ColumnDefinitions>
        <xc:WatermarkPasswordBox
            xc:WatermarkPasswordBox.WatermarkText="Type something..."
            IsPasswordRevealButtonEnabled="True"
            Margin="10,0,20,0"
            VerticalAlignment="Center"
            HorizontalAlignment="Left" />
        <TextBlock
            Style="{StaticResource TitleTextStyle}"
            TextAlignment="Center"
            Text="Default WatermarkPasswordBox with WatermarkText"
            Grid.Column="1"
            Margin="0,0,0,10"
            RenderTransformOrigin="0.5,0.5"
            HorizontalAlignment="Left"
            VerticalAlignment="Center" />
        <xc:WatermarkPasswordBox
            VerticalContentAlignment="Center"
            HorizontalContentAlignment="Left"
            PasswordChar="#"
            Margin="10,0,20,0"
            Grid.Row="1"
            VerticalAlignment="Center"
            HorizontalAlignment="Left">
            <xc:WatermarkPasswordBox.Watermark>
                <StackPanel
                    Orientation="Horizontal">
                    <TextBlock
                        Text="Type Here"
                        FontWeight="Bold"
                        Foreground="WhiteSmoke" />
                    <Path
                        Margin="10,0,0,0"
                        Width="60"
                        Height="20"
                        Stretch="Fill"
                        Fill="WhiteSmoke"
                        Data="M0,8 L60,8 60,0 C60,1 90,10 100,10 C90,10 60,19 60,20 L60,12 0,12 z" />
                </StackPanel>
            </xc:WatermarkPasswordBox.Watermark>
        </xc:WatermarkPasswordBox>
        <TextBlock
            Style="{StaticResource TitleTextStyle}"
            TextAlignment="Center"
            Text="Default WatermarkPasswordBox with (non-text) Watermark"
            Grid.Column="1"
            Margin="0,0,0,10"
            Grid.Row="1"
            RenderTransformOrigin="0.5,0.5"
            HorizontalAlignment="Left"
            VerticalAlignment="Center" />
        <xc:WatermarkPasswordBox
            xc:WatermarkPasswordBox.WatermarkText="&gt;&gt; custom prompt... &lt;&lt;"
            MaxLength="3"
            Margin="10,0,20,0"
            Grid.Row="2"
            VerticalAlignment="Center"
            HorizontalAlignment="Left">

            <xc:WatermarkPasswordBox.WatermarkTextStyle>
                <Style
                    TargetType="TextBlock">
                    <Setter
                        Property="Margin"
                        Value="{StaticResource TextControlBorderThemeThickness}" />
                    <Setter
                        Property="Padding"
                        Value="{StaticResource TextControlThemePadding}" />
                    <Setter
                        Property="HorizontalAlignment"
                        Value="Center" />
                    <Setter
                        Property="VerticalAlignment"
                        Value="Center" />
                    <Setter
                        Property="FontFamily"
                        Value="Consolas" />
                    <Setter
                        Property="FontSize"
                        Value="18" />
                    <Setter
                        Property="Foreground"
                        Value="Red" />
                    <Setter
                        Property="FontWeight"
                        Value="Black" />
                </Style>
            </xc:WatermarkPasswordBox.WatermarkTextStyle>
        </xc:WatermarkPasswordBox>
        <TextBlock
            Style="{StaticResource TitleTextStyle}"
            TextAlignment="Center"
            Text="WatermarkPasswordBox with custom WatermarkTextStyle"
            Grid.Column="1"
            Margin="0,0,0,10"
            Grid.Row="2"
            RenderTransformOrigin="0.5,0.5"
            HorizontalAlignment="Left"
            VerticalAlignment="Center" />
        <xc:WatermarkPasswordBox
            xc:WatermarkPasswordBox.Watermark="Type something..."
            IsPasswordRevealButtonEnabled="True"
            Margin="10,0,20,0"
            Grid.Row="3"
            Visibility="Collapsed"
            VerticalAlignment="Center"
            HorizontalAlignment="Left" />
        <TextBlock
            Style="{StaticResource TitleTextStyle}"
            TextAlignment="Center"
            Text="Default WatermarkPasswordBox with Watermark - Collapsed (for toolkit testing purposes)"
            Grid.Column="1"
            Margin="0,0,0,10"
            Grid.Row="3"
            RenderTransformOrigin="0.5,0.5"
            HorizontalAlignment="Left"
            VerticalAlignment="Center" />
    </Grid>
</UserControl>
